<template>
  <div>
    <a-form :model="form" layout="vertical" @submit-success="submit">
      <a-card :bordered="false">
        <a-form-item label="Label1">
          <a-input></a-input>
        </a-form-item>
        <a-form-item label="Label2">
          <a-input-number></a-input-number>
        </a-form-item>
        <a-form-item label="Label3">
          <a-textarea></a-textarea>
        </a-form-item>
        <a-button :loading="loading" long type="primary" html-type="submit"> 确定 </a-button>
      </a-card>
    </a-form>
  </div>
</template>

<script setup lang="ts">
import { list } from "../data/curd";
import { form, showForm } from "../data/form";

const loading = ref(false);
const submit = async () => {
  loading.value = true;
  if (form.value.id) {
  } else {
  }
  loading.value = false;
  list();
  showForm.value = false;
};
</script>

<style lang="scss" scoped></style>
